﻿using SalesSys.DAL.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SalesSys.BLL
{
    public class CustomerContactBLL : BaseBLL<CustomerContact, Guid>
    {
        public void DeleteByCustomerId(Guid customerId)
        {
            var query = Rep.Entities.Where(p => p.CustomerId == customerId).ToList();
            if (query.Count > 0)
            {
                foreach (var item in query)
                {
                    Rep.Delete(item.Id);
                }
            }
        }
    }
}
